
<!-- saved from url=(0069)http://ads.pubmatic.com/AdServer/js/syncuppixels.html?p=28388&s=28389 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
var protocol = document.location.protocol != "https:"? "http:" : "https:";
    document.write("<script type='text/javascript'"
        + " src='"+ protocol +"//ads.pubmatic.com/AdServer/js/cutil7461c5042928e06d0ddb25dc4baed78b.js' >"
        + '</' + 'script' + '>');
</script><script type="text/javascript" src="cutil7461c5042928e06d0ddb25dc4baed78b.js"></script>

<script type="text/javascript">
var protocol = document.location.protocol
   ,secure = protocol == 'https:';

function setNCBCookie()
{
	NCBCheckCookie = new Cookie("KTPCACOOKIE", 4);
	NCBCheckCookie.set("YES");
	return 0;
}


function checkNCBCookie()
 {
    NCBCheckCookie = new Cookie("KTPCACOOKIE", 4);
    NCBCookieValue = NCBCheckCookie.get();
	if (NCBCookieValue === "" || NCBCookieValue !== "YES" ) {

		var srcLink = secure ? 'https%3A%2F%2Fsimage2.pubmatic.com%2FAdServer%2FPug%3Fvcode%3Dbz0yJnR5cGU9MSZqcz0xJmNvZGU9MjIxNSZ0bD0xNTc2ODAw%0A%26piggybackCookie%3DNCB' : 'http%3A%2F%2Fimage2.pubmatic.com%2FAdServer%2FPug%3Fvcode%3Dbz0yJnR5cGU9MSZqcz0xJmNvZGU9MjIxNSZ0bD0xNTc2ODAw%0A%26piggybackCookie%3DNCB';

		src = "<iframe name='pframeNCB' width='0' height='0' frameborder='0' marginwidth='0' marginheight='0' vspace='0' hspace='0' allowtransparency='true' scrolling='no' src=\'" + unescape(srcLink) + "\'><\/iframe>";
    	document.write(src);
		return -1;
     }
	return 0;
}


setNCBCookie();

//	get publisher id dynamically
var pub=1;
pub = queryString( 'p');

if (checkNCBCookie() == -1 && pub != "28127"){
	var pix = {};
}
else{

//PIXSTART    --DO NOT REMOVE
 var pix = {
"1":{"exp":14,"url":"http://pixel.invitemedia.com/pubmatic_sync?pubmatic_callback=http%3A%2F%2Fimage2.pubmatic.com%2FAdServer%2FPug%3Fvcode%3Dbz0yJnR5cGU9MSZjb2RlPTM5MCZ0bD0xMjk2MDA%3D%0A%26piggybackCookie%3D","secureurl":""},
"2":{"exp":8,"url":"http://ad.turn.com/server/pixel.htm?fpid=1&sp=y","secureurl":""},
"3":{"exp":14,"url":"http://ib.adnxs.com/getuidnb?http://image2.pubmatic.com/AdServer/Pug?vcode=bz0xJnR5cGU9MSZqcz0xJmNvZGU9NzkmdGw9MTQ0MCZkcF9pZD01Nw==&vcode=bz0yJnR5cGU9MSZqcz0xJmNvZGU9NzgmdGw9MTU3NjgwMCZkcF9pZD01Nw==&piggybackCookie=uid:$UID","secureurl":""},
"4":{"exp":14,"url":"http://d.xp1.ru4.com/meta?_o=179638&_t=cmcont&ssv_ptnr=pm","secureurl":""},
"5":{"exp":14,"url":"http%3A//i.w55c.net/ping_match.gif%3Fei%3DPUBMATIC%26rurl%3Dhttp%253A//image2.pubmatic.com/AdServer/Pug%253Fvcode%253Dbz0yJnR5cGU9MSZjb2RlPTU3MSZ0bD0xNTc2ODAw%2526piggybackCookie%253Duid%253A_wfivefivec_","secureurl":""},
"6":{"exp":14,"url":"http://idpix.media6degrees.com/orbserv/hbpix?pixId=3715","secureurl":""},
"7":{"exp":14,"url":"http://sync.mathtag.com/sync/img?redir=http%253A%252F%252Fimage2.pubmatic.com%252FAdServer%252FPug%253Fvcode%253Dbz0yJnR5cGU9MSZjb2RlPTM2MiZ0bD00MzIwMA%253D%253D%2526piggybackCookie%253Duid%253A%255BMM_UUID%255D","secureurl":""},
"8":{"exp":14,"url":"http://pixel.quantserve.com/pixel/p-5aWVS_roA1dVM.gif?idmatch=0","secureurl":""},
"9":{"exp":14,"url":"http://bh.contextweb.com/bh/getuid?url=http://image2.pubmatic.com/AdServer/Pug?vcode=bz0yJnR5cGU9MSZqcz0xJmNvZGU9ODI1JnRsPTQzMjAw%26piggybackCookie%3D%25%25CWGUID%25%25%2CUser_tokens%3A%25%25USER_TOKENS%25%25","secureurl":""},
"10":{"exp":14,"url":"http://user.lucidmedia.com/clicksense/user?p=a371b4911c4e5b09&r=1","secureurl":""},
"12":{"exp":2,"url":"http://ads.pubmatic.com/HostedThirdPartyPixels/TF/ae_12232010.html","secureurl":""},
"13":{"exp":14,"url":"http://um.simpli.fi/pm_match?http://image2.pubmatic.com/AdServer/Pug?vcode=bz0yJnR5cGU9MSZqcz0xJmNvZGU9ODA2JnRsPTUxODQwMA==&piggybackCookie=uid:$UID","secureurl":""},
"15":{"exp":14,"url":"http://pubmatic-match.dotomi.com","secureurl":""},
"16":{"exp":1,"url":"http://r.turn.com/r/du/id/L21rdC8xL21jaHBpZC8z/","secureurl":""},
"17":{"exp":14,"url":"http://pm-m.d.chango.com/m/pm","secureurl":""},
"18":{"exp":1,"url":"http://ads.pubmatic.com/HostedThirdPartyPixels/ROne/ro_x914.html","secureurl":""},
"19":{"exp":14,"url":"http://pix04.revsci.net/getuid?id=pmtc&ref=http://image2.pubmatic.com/AdServer/Pug?vcode=bz0yJnR5cGU9MSZjb2RlPTIwMTgmdGw9NDMyMDA=","secureurl":""},
"20":{"exp":1,"url":"http://pubmatic.push.qwobl.net/","secureurl":""},
"21":{"exp":1,"url":"http://cm.g.doubleclick.net/pixel?google_nid=pubmatic&google_cm&google_sc","secureurl":""},
"22":{"exp":14,"url":"http://rtd.tubemogul.com/upi/pid/b9pj45k4?redir=http%253A%252F%252Fimage2.pubmatic.com%252FAdServer%252FPug%253Fvcode%253Dbz0yJnR5cGU9MSZqcz0xJmNvZGU9MjE5MSZ0bD0yNTkyMDA%253D%2526piggybackCookie%253D%2524%257BUSER_ID%257D=","secureurl":""},
"27":{"exp":1,"url":"http://um.eqads.com/pub.aspx","secureurl":""},
"29":{"exp":14,"url":"http%3A%2F%2Fimage2.pubmatic.com%2FAdServer%2FPug%3Fvcode%3Dbz0xJnR5cGU9MSZqcz0xJmNvZGU9MjU3OCZ0bD0xNTc2ODAw","secureurl":""},
"30":{"exp":14,"url":"http%3A%2F%2Fimage2.pubmatic.com%2FAdServer%2FPug%3Fvcode%3Dbz0xJnR5cGU9MSZqcz0xJmNvZGU9MjU3NyZ0bD0xNTc2ODAw","secureurl":""}
//"11":{"exp":14,"url":"http://admonkey.dapper.net/PubmaticUIDMonster?http://image2.pubmatic.com/AdServer/Pug?vcode=bz0yJnR5cGU9MSZqcz0xJmNvZGU9MTU1MCZ0bD02MA==&piggybackCookie=uid:$UID","secureurl":""},
//"14":{"exp":1,"url":"http://a.triggit.com/pxpuicm?redirect=http%3A%2F%2Fimage2.pubmatic.com%2FAdServer%2FPug%3Fvcode%3Dbz0yJnR5cGU9MSZjb2RlPTcwJnRsPTQzMjAw%0A%26piggybackCookie%3D","secureurl":""},
//"28":{"exp":1,"url":"http://rt.legolas-media.com/lgrt?ci=2&ti=9983&pbi=10892&lgif=1&fpb=##PM_PUBID","secureurl":""},
};
//PIXEND

}

//	list of data center to pixel mapping : "dc id" : [array of pixel ids]    1=SF,SJ, 2=NY, 3=LN
//DCSTART    --DO NOT REMOVE
 var dc_pix= {
"1" : [1,2,3,4,5,6,7,8,10,12,13,15,16,18,19,20,21,22,29,30],
"2" : [1,2,3,4,5,6,7,8,9,10,12,13,15,16,17,18,19,21,27,29,30],
"3" : [1,2,3,5,7,8,13,21,29,30]
};
//DCEND

//	list of publisher to pixel blocking : "pub id" : [array of pixel ids] 
//PUBSTART    --DO NOT REMOVE
 var pub_pix= {

};
//PUBEND

//	list of publisher sites to pixel blocking : "site id" : [array of pixel ids] 
//SITESTART    --DO NOT REMOVE
 var site_pix= {
"25572" : [3],
"26729" : [4,5,7]
};
//SITEEND
//	list of publisher and max pixel count 
//PIXCOUNTSTART    --DO NOT REMOVE
 var pub_pix_count= {
"14880" : 10,
"25656" : 10
};
//PIXCOUNTEND
function queryString(parameter) { 
  var loc = location.search.substring(1, location.search.length);
  var param_value = false;
  var params = loc.split("&");
  for (i=0; i<params.length;i++) {
      param_name = params[i].substring(0,params[i].indexOf('='));
      if (param_name == parameter) {
          param_value = params[i].substring(params[i].indexOf('=')+1)
      }
  }
  if (param_value) {
      return param_value;
  }
  else {
      return false; //Here determine return if no parameter is found
  }
}

function getDC ()
{
	var dcookie= new Cookie ("PUBMDCID");
	return dcookie.get ();
}

function substituteMacros(origUrl, pubId, siteId)
{
	var url = origUrl.replace("##PM_PUBID", pubId);
	url = url.replace("##PM_SID", siteId);
	url = url.replace("##PM_RANDOM", Math.floor(Math.random()*100000001) + '');
	
	return url;			
}

function deleteSyncUpPixOnCookie() {
	// delete the cookie to indicate sync up pixels is no longer in progress
        Delete_Cookie( 'SYNCUPPIX_ON', '/', komli_domain);

}

// check if syncup pixels is already in progress
var syncupOnCookie = new Cookie("SYNCUPPIX_ON");
if( syncupOnCookie.get() == "" ) {
	//create a cookie to indicate that syncup pixels is in progress and so that no other instance is run in parallel. Parallel calls could result in same pixel being fired multiple times. This cookie is deleted once the sync up pixels are fired or after 30 seconds or when the page is unloaded which ever is earlier
	Set_Cookie( 'SYNCUPPIX_ON', 'YES', 20 / (24*60*60), '/', komli_domain, '');
        // add an event handler so that this cookie which indicates that syncup pixels is in progress is deleted (if it exists) when the page is unloaded
        pm_addEventListener_j(window,'unload', deleteSyncUpPixOnCookie, false);


//	get publisher site id dynamically
var site=1;
site = queryString( 's');

//	set max pixel count for rotation
var max_pix_cnt=6;

// see if the request is coming from id_syncup
var idSync = queryString( 'idSync');

//	change max pixel count for rotation based on publisher 
if ( typeof( pub) !== 'undefined' && typeof(pub_pix_count[pub]) !== 'undefined' )
max_pix_cnt=pub_pix_count[pub];


var dc = getDC();
if ( dc == "") dc =1 ;

//      Create the list of of Pixels needed (id, ttl, url)
var pixels = new Pixels ();

//	get all the pixels of this data center
plist=dc_pix[dc] ;

//	get all the pixels of this publisher
pblock=pub_pix[pub];

//	get all the pixels blocked for this publisher  site
sblock=site_pix[site] ;

var maxLen = 0;
if( typeof(pblock) !== 'undefined' && pblock.length > 0)
{
	maxLen = pblock.length;
}
if( typeof(sblock) !== 'undefined' && maxLen < sblock.length )
{
	maxLen = sblock.length;
}

//	add unblocked pixels to rotation
if ( typeof( plist) !== 'undefined')
for (var i=0; i<plist.length; i++)
{
	blocked = 0 ;

	for (var j=0; j<maxLen; j++)
	{

		if ( typeof( pblock) !== 'undefined' && j < pblock.length && typeof(pix[plist[i]]) !== 'undefined' )
                {
                        blocked += (plist[i] == pblock[j]) ? 1 : 0 ;
                }

		if ( typeof( sblock) !== 'undefined' && j < sblock.length && typeof(pix[plist[i]]) !== 'undefined' )
		{
			blocked += (plist[i] == sblock[j]) ? 1 : 0 ;
		}
		if( blocked > 0 )
			break;
	}

	//	add pixel if not blocked for this publsher site
	if ( !blocked && typeof(pix[plist[i]]) !== 'undefined' )
	{
		//alert (plist[i] + "," + pix[plist[i]].url);
		var pixUrl =  secure ? pix[plist[i]].secureurl : pix[plist[i]].url;
		if (undefined != pixUrl && pixUrl.length)
		{
			// substitute macros and add it to list of eligible pixels
			pixUrl = substituteMacros(pixUrl, pub, site);
			pixels.add ( plist[i], pix[plist[i]].exp, pixUrl);
		}
	}
}


//      Select and invoke only defined max number of pixels
	syncRTBCookie = new Cookie("SyncRTB", 4);
   	syncRTBCookieValue = syncRTBCookie.get();
	if (syncRTBCookieValue === "" && pub != "28127" ) {
		pixels.select (1);	
	}
	else{
		pixels.select (max_pix_cnt);
	}
	if (typeof (idSync) === 'boolean' && idSync === false && (dc === 1 || dc === 2)) {
		var syncedUser = new Cookie("SUSER", 4);
		var syncedUserValue = syncedUser.get();
		var callStore = 0;
		var cookieUpdated = new Cookie("SSCS", 4);
		var cookieUpdatedValue = cookieUpdated.get();
		if (syncedUserValue == "") {
			var randomNumber=Math.floor(Math.random()*100);
			if (randomNumber < 101) {
				Set_Cookie( 'SUSER', 'YES', 8, '/', komli_domain, '');
				callStore = 1;
			} else {
				Set_Cookie( 'SUSER', 'NO', 8, '/', komli_domain, '');
			}
		}
		var lastcall = 0;
		var dspcallensurecookie = new Cookie("USCC", 4);
		var dspcallensurecookieValue = dspcallensurecookie.get();

		if (callStore === 1 || syncedUserValue === "YES" || cookieUpdatedValue === "YES") {
			Set_Cookie( 'SUSER', 'YES', 8, '/', komli_domain, '');
			if(dspcallensurecookieValue === 'ONE' ) {
				Set_Cookie( 'USCC', 'TWO', 8, '/', komli_domain, '');
				lastcall = 1;
			}
			if(dspcallensurecookieValue == "" ||  lastcall === 1 || cookieUpdatedValue === "YES") {
				if (cookieUpdatedValue != "") {
					Delete_Cookie( 'SSCS', '/', komli_domain);
				}
				renderScript();
			}
		}
	}
//deleteSyncUpPixOnCookie()
}

function renderScript() {
	var NCBCheckCookie = new Cookie("KTPCACOOKIE", 4);
	var NCB_value = NCBCheckCookie.get();
	if(NCB_value === 'YES') {
		var actualSrc = secure ? ' src="' + protocol + '//simage4.pubmatic.com/AdServer/SPug"':' src="' + protocol + '//image4.pubmatic.com/AdServer/SPug"'; 
		var frameSrc='<iframe name="serversidecall"';
		frameSrc+=' frameborder="0" allowtransparency="true" hspace="0" vspace="0"';
		frameSrc+=' marginheight="0" marginwidth="0" scrolling="no"';
		frameSrc+=' width="0"';
		frameSrc+=' height="0"';
		frameSrc+= actualSrc;
		frameSrc+='>';
		frameSrc+='</iframe>';
		document.write(frameSrc);
	}
}

</script>
</head>
<body marginwidth="0" marginheight="0">


</body></html>